<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
   

<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="this is my page">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<link rel="stylesheet" type="text/css" href="css/bottom.css">

<script type="text/javascript" src="scripts/jquery-1.6.2.js"></script>
<script type="text/javascript" src="scripts/format.js"></script>

<script type="text/javascript">
	$(function() {

		$('#time').html(formatTime(new Date())); //后面的循环有一秒钟的延迟,这里补上

		//异步获取用户账号
		$.ajax({
			url : 'GetUserAccount',
			type : "post",
			success : function(data) {
				if (!data) {
					window.parent.location = 'login.html?time='
							+ new Date().getTime();
				} else {
					$("#username_span").html(" " + data.account);
				}

			},
			error : function(returnState) {
				alert('异步获取账号信息失败！')
				window.parent.location = 'login.html?time='
						+ new Date().getTime();
			}
		});

		//在右下方显示当前时间
		var timer = setInterval("getTime()", 1000);

	});

	function getTime() {
		$('#time').html(formatTime(new Date()));
	}
</script>

</head>
<body>
	<div id="username">
		管理员: <span id="username_span"></span>
	</div>
	<div id="time"></div>
</body>
</html>